﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SiteSearch.Master" AutoEventWireup="true" CodeBehind="Doctor.aspx.cs" Inherits="SACM.PageConsultorio.Doctor" %>
<%@ MasterType VirtualPath="~/SiteSearch.Master" %>
<%@ Register TagPrefix="uc" TagName="ToolBar" Src="~/Controls/ToolBar.ascx" %>
<asp:Content ID="c1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript" src="../Scripts/PageDoctor.js"></script>
</asp:Content>
<asp:Content ID="c2" ContentPlaceHolderID="cphFilter" runat="server">
    <table>
        <tr>
            <td class="tdEtiqueta">
                Nombre:
            </td>
            <td class="tdCampo">
                <ganda:TextBox ID="TxtNombre" runat="server" Width="200px" MaxLength="200" TabIndex="0" />
            </td>
        </tr>
    </table>
    <div class="btnBusar">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:Button ID="btnBuscar" runat="server" Text="Buscar" CssClass="boton" OnClick="BtnBuscar_Click"/>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphContent" runat="server">
    <uc:ToolBar runat="server" id="toolbar" />
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            <ganda:GridView ID="gridDocs" runat="server" AutoGenerateColumns="False" DataKeyNames="IdDoctor"
               AllowPaging="True" onrowcommand="gridDocs_RowCommand" AllowScroll="true" OnPageIndexChanging="gridDocs_PageIndexChanging">
                <PagerSettings Mode="NextPreviousFirstLast" Position="Top"/>
                <Columns>
                    <asp:BoundField DataField="IdEmpresa" HeaderText="IdEmpresa" SortExpression="IdEmpresa" Visible="false">
                    </asp:BoundField>
                    <asp:BoundField DataField="IdSucursal" HeaderText="IdSucursal" SortExpression="IdSucursal" Visible="false">
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="Acción" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <%--<asp:Button ID="BtnMod" CssClass="btnMod" runat="server" Text="" CommandName="cmdModificar" CommandArgument='<%#Eval("IdDoctor") + "," + Container.DataItemIndex %>' />--%>
                            <asp:Button ID="BtnMod" CssClass="btnMod" runat="server" Text="" CommandName="cmdModificar" Params='<%#Eval("IdDoctor") + "," + Container.DataItemIndex %>' OnClientClick="return EditRegistro(this);" ToolTip="Editar" />
                            <ganda:Button ID="BtnDel" CssClass="btnDel" runat="server" Text="" Params='<%#Eval("IdDoctor") + "," + Container.DataItemIndex %>' OnClientClick="return Elimina(this);" ToolTip="Eliminar" />
                        </ItemTemplate>
                        <ItemStyle Width="80px" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="IdDoctor" HeaderText="Id" SortExpression="IdDoctor" ItemStyle-Width="100px">
                    </asp:BoundField>
                    <asp:BoundField DataField="NombreCompleto" HeaderText="Nombre" SortExpression="NombreCompleto" ItemStyle-Width="200px">
                    </asp:BoundField>
                    <asp:BoundField DataField="Telefono" HeaderText="Telefono" SortExpression="Telefono" ItemStyle-Width="100px"/>
                    <asp:BoundField DataField="CedulaProfesional" HeaderText="Cedula Profesional" SortExpression="CedulaProfesional" ItemStyle-Width="100px"/>
                    <asp:BoundField DataField="RFC" HeaderText="RFC" SortExpression="RFC" ItemStyle-Width="100px"/>
                    <asp:BoundField DataField="DomicilioFiscal" HeaderText="Domicilio Fiscal" SortExpression="DomicilioFiscal" ItemStyle-Width="250px"/>
                </Columns>
            </ganda:GridView>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="toolbar" />
        </Triggers>
    </asp:UpdatePanel>

    <div style="display: none;">
        <asp:UpdatePanel runat="server" ID="updhidden">
            <ContentTemplate>
                <asp:HiddenField ID="hdnId" runat="server" />
                <asp:Button ID="btnElimina" runat="server" OnClick="btnElimina_Click" CausesValidation="false" />
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>

    <script type="text/javascript">
        var btnBuscar = '<%=btnBuscar.ClientID %>';
        var hdnId = '<%=hdnId.ClientID %>';
        var btnElimina = '<%=btnElimina.ClientID %>';
        var txtNombre = '<%=TxtNombre.ControlTextBox.ClientID %>'
    </script>
</asp:Content>
